home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / Quill / Source / ClickNotifier.h < prev    next >
Text File  |  1997-05-04  |  1KB  |  58 lines

  1. /*
  2.  *    File:        ClickNotifier.h
  3.  *    Function:    A behavior that sends a command to an MCommander when its owner
  4.  *                is clicked.
  5.  *    Written by:    Jesse Jones
  6.  *
  7.  *  Copyright ゥ 1997 Jesse Jones. 
  8.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  9.  *
  10.  *    Change History (most recent first):
  11.  *
  12.  *         <1>     5/04/97    JDJ        Created (from CClickBehavior in TextTraitsDialog.cpp)
  13.  */
  14.  
  15. #pragma once
  16.  
  17. #include <ZBehavior.h>
  18. #include <ZEvent.h>
  19.  
  20.  
  21. //-----------------------------------
  22. //    Forward References
  23. //
  24. class MCommander;
  25.  
  26.  
  27. // ===================================================================================
  28. //    class CClickNotifier
  29. // ===================================================================================
  30. class CClickNotifier : public TBehavior<TMouseEvent> {
  31.  
  32.     typedef TBehavior<TMouseEvent> Inherited;
  33.  
  34. //-----------------------------------
  35. //    Initialization/Destruction
  36. //
  37. public:
  38.     virtual             ~CClickNotifier();
  39.     
  40.                         CClickNotifier(MCommander* notifyee, const string& command);
  41.                         // Sends command to notifee when owner is clicked.
  42.                         
  43. //-----------------------------------
  44. //    TBehavior API 
  45. //
  46. protected:
  47.     virtual bool         OnExecute(TMouseEvent& event);
  48.  
  49. //-----------------------------------
  50. //    Member data 
  51. //
  52. protected:
  53.     MCommander*    mNotify;
  54.     string        mCommand;
  55. };
  56.  
  57.  
  58.